import request from '@/utils/request.js'

// 获取当前用户购物车  /cart/cartList  GET  
export const getCartList = () => request({
	url: "/cart/cartList",
	method: 'get'
})

// 修改购物车商品数量   /cart/update/quantity/{id}  post 
export const updateQuantity=(id,number)=>request({
	url:`/cart/update/quantity/${id}?quantity=${number}`,
	method: 'post',
})


// 删除购物 /cart/delete post 
export const deleteCart=(ids)=>request({
	url:`/cart/delete?ids=${ids}`,
	method: 'post',
})

//   根据购物车信息生成确认单    /portalOrder/generateConfirmOrder  post 
export const generateConfirmOrder=(data)=>request({
	url:`/portalOrder/generateConfirmOrder`,
	method:"post",
	data
})
